import com.sun.corba.se.impl.orbutil.ObjectStreamClassUtil_1_3;

import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;

import static java.nio.charset.StandardCharsets.UTF_16;
import static java.nio.charset.StandardCharsets.UTF_8;

public class Test {
    public static void main(String[] args) throws UnsupportedEncodingException {
//        String str="helloWorld";//直接构造
//        String str1=new String("helloWorld");//new出对象
//        char[] ch={'h','e','l','l','o','W','o','r','l','d'};
//        String str2=new String(ch,1,2);//取下标在[1,2]区间字符构造字符串
//        System.out.println(str2);
//        byte[] bytes = {104, 101, 108, 108, 111}; // 字节数组，对应ASCII "hello"
//        String str3 = new String(bytes, "UTF-8"); // 使用UTF-8编码构造字符串
//        System.out.println(str+"\n"+str1+"\n"+str2+"\n"+str3);
        String str="ABCD";
        str.toLowerCase();
        System.out.println(str);

    }
}

